import { axios } from '@/utils/request'
export function getSysEnterpriseList (params) {
  return axios({
    url: '/sys/enterprise/pageQueryEnterprise',
    method: 'get',
    params
  })
}
export function getSysEnterpriseAdd(parameter) {
  return axios({
    url: '/sys/enterprise/add',
    method: 'post',
    data:parameter
  })
}
export function getSysEnterpriseEdit(parameter) {
  return axios({
    url: '/sys/enterprise/update',
    method: 'post',
    data:parameter
  })
}
export function getSysEnterpriseDetails(id) {
    id = id !== undefined ? id : '';
    return axios({
        url:`/sys/enterprise/detail?id=${id}`,
        method: 'get',
    })
}
export function getSysEnterpriseEnable(parameter) {
  return axios({
    url: '/sys/enterprise/disOrEnable',
    method: 'post',
    data:parameter
  })
}
export function SysGetEnterpriseIdInfo(enterpriseId) {
  enterpriseId = enterpriseId !== undefined ? enterpriseId : '';
  return axios({
    url: `/sys/enterprise/detailByEnterpriseId?enterpriseId=${enterpriseId}`,
    method: 'get'
  })
}
export function sysEnterpriseIdAdminList(relationId) {
   relationId = relationId !== undefined ? relationId : '';
  return axios({
    url:`/sys/enterprise/listAdministratorByRelationId?relationId=${relationId}`,
    method: 'get'
  })
}
export function sysApplyAdminToEnterprise(parameter) {
  return axios({
    url: '/sys/enterprise/applyAdministratorToEnterprise',
    method: 'post',
    data:parameter
  })
}
export function sysEnterpriseAdminClose(parameter) {
  return axios({
    url: '/sys/enterprise/rescindAdministrator',
    method: 'post',
    data:parameter
  })
}
export function sysAllEnabledEnterprise() {
  return axios({
    url: '/sys/enterprise/listAllEnabledEnterprises',
    method: 'get'
  })
}
export function sysAllEnabledEnterpriseFee(){
  return axios({
    url: '/sys/enterprise/enterprises',
    method: 'get'
  })
}
export function sysEnterpriseIdSignList(enterpriseId) {
   enterpriseId = enterpriseId !== undefined ? enterpriseId : '';
  return axios({
     url:`/sys/enterprise/queryEnterpriseSignModesByEnterpriseId?enterpriseId=${enterpriseId}`,
    method: 'get'
  })
}
export function sysGetEnterpriseIdRelationParkList(enterpriseId) {
   enterpriseId = enterpriseId !== undefined ? enterpriseId : '';
  return axios({
     url:`/sys/enterprise/listEnterpriseAssociatedParks?enterpriseId=${enterpriseId}`,
    method: 'get'
  })
}
export function getEnterpriseIdRelationParkList(parameter) {
  return axios({
    url: '/sys/pt/enterprise/queryEnterpriseAssociationParks',
    method: 'post',
    data:parameter
  })
}
export function getEnterpriseOrParkDetail(parkId) {
   parkId = parkId !== undefined ? parkId : '';
  return axios({
     url:`/sys/pt/enterprise/queryEnterpriseAssociationParkDetail?parkId=${parkId}`,
    method: 'get'
  })
}
export function getEnterpriseOrParkEnabled(parameter) {
  return axios({
    url:'/sys/pt/enterprise/queryEnterpriseAssociationParksEnabled',
    method: 'post',
    data:parameter
  })
}